Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Prints html in the terminal using colors and simple layout to reflect the document structure.
Prints html in the terminal using colors and simple layout to reflect the document structure.
Provide a simple tool to render html in the terminal in a readable format. It is not supposed to replace your browser. The main indended use is to render html snippets, e.g., the ones contained in the descriptions of the json version of the nodejs documentation.
If you want a terminal browser, try lynx instead.
npm install hermit
To use hermit from the command line, you should install it globally:
npm -g install hermit
hermit filename.html
You can pipe the output of any program that produces an html string into hermit.
Example:
curl http://nodejs.org/api/assert.html | hermit
var hermit = require('hermit');
, html = '<div><h3>Hello from Hermit</h3><p>A little paragraph for you</p></div>';
hermit(html, function (err, res) {
console.log(res);
});
Output:
Hello from Hermit (in green)
-----------------
A little paragraph for you
In order to affect the way that the printed html is layed out and styled, you can pass in custom properties.
These include a stylesheet with the properties outined in the default hermit stylesheet.
var hermit = require('hermit');
, html = '<div><h3>Hello from Hermit</h3><p>A little paragraph for you</p></div>';
, myStylesheet = require('./path/to/my/stylesheet.js');
hermit(html, { listIndent: ' ', listStyle: '* ', stylesheet: myStylesheet }, function (err, res) {
console.log(res);
});
For more information a detailed example read this hermit test
FAQs
Prints html in the terminal using colors and simple layout to reflect the document structure.
The npm package hermit receives a total of 3,845 weekly downloads. As such, hermit popularity was classified as popular.
We found that hermit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.